<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body></body>
</html>
<script>
    // 验证手机号码（开头以1开始，后面10位数字）
    const regx = /^1\d{10}$/g;
    const str = "18621576365";
    console.log(regx.test(str));
</script>
